package com.cq.hd.member.mapper;

import com.cq.hd.member.api.dto.AdminWithdrawalApplyPageDto;
import com.cq.hd.member.api.dto.WithdrawalApplyPageDto;
import com.cq.hd.member.api.dto.WithdrawalBillDto;
import com.cq.hd.member.api.vo.AdminWithdrawalApplyPageVo;
import com.cq.hd.member.api.vo.WithdrawalApplyPageVo;
import com.cq.hd.member.api.vo.WithdrawalBillVo;
import com.cq.hd.member.po.TbWithdrawalBillPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 提现记录表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-28
 */
@Mapper
public interface TbWithdrawalBillMapper extends BaseMapper<TbWithdrawalBillPo> {

    List<WithdrawalApplyPageVo> listAppWithdrawalBillByDto(WithdrawalApplyPageDto withdrawalApplyPageDto);

    List<AdminWithdrawalApplyPageVo> listAdminAgentWithdrawalBillByDto(AdminWithdrawalApplyPageDto adminWithdrawalApplyPageDto);

    List<AdminWithdrawalApplyPageVo> listAdminMerchantWithdrawalBillByDto(AdminWithdrawalApplyPageDto adminWithdrawalApplyPageDto);

    List<WithdrawalBillVo> listByDto(WithdrawalBillDto withdrawalBillDto);

    // 统计商户已提金额
    BigDecimal sumMerchantWithdrawalAmt(@Param("merchantId") Long merchantId, @Param("withdrawalTypes") List<Integer> withdrawalTypes);

}
